
package bean.reflection.indexed;

/**
 * 和 MyBean 做比較, 在這裏多了二個 Method setName( int idx, String name ) and setNames( String[] names )<br>
 * <br>
 * Copyright: Copyright (c) 2001-2007<br>
 * Company: 一零四資訊科技股份有限公司
 * 
 * @author Eric.Kao(eric.kao@104.com.tw)
 * @version 1.0
 */
public class ComplexBean
{
	private String[] names =
		{ "eric", "loso", "david" };

	private String address;

	private boolean selected;

	public ComplexBean()
	{
	}

	public String[] getNames()
	{
		return names;
	}

	public String getName( int index )
	{
		return names[ index ];
	}

	public String getAddress()
	{
		return address;
	}

	public boolean isSelected()
	{
		return selected;
	}

	public void setName( int idx, String name )
	{
		names[ idx ] = name;
		
		System.out.println( "execute method setName(), idx:" + idx + ", name:" + name );
	}

	public void setNames( String[] names )
	{
		this.names = names;
	}

	public void setAddress( String address )
	{
		this.address = address;
	}

	public void setSelected( boolean selected )
	{
		this.selected = selected;
	}
}
